package com.luo.solr;

import com.luo.solr.SolrService;
import com.luo.solr.pojo.User;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

/**
 * @Auther: 罗健康
 * @Date: 2020/11/13 17:14
 * @Description:
 */
@Service
public class SolrServiceImpl implements SolrService {
    @Override
    public List<User> addUser() {
        List<User> list = new ArrayList<>();
        User user = new User();
        for (int i = 0; i <5 ; i++) {
            user.setId(UUID.randomUUID().toString().replace("-",""));
            user.setName("jackk"+i);
            if( i % 2 ==0) {
                user.setSex("男");
            }else {
                user.setSex("女");
            }
            user.setAddress("上海市徐汇区"+i);
            list.add(user);
        }
        return list;
    }
}
